﻿package pk;

import java.util.Calendar;  
 
public class CalendarDemo {  
    public static void main(String[] args) {  
      
        int year = rightNow.get(Calendar.YEAR);  
 
        int month = rightNow.get(Calendar.MONTH);  

        int date = rightNow.get(Calendar.DATE);  
 
       int hour_of_day = rightNow.get(Calendar.HOUR_OF_DAY);  
  
        int minuth = rightNow.get(Calendar.MINUTE);  
 
        int second = rightNow.get(Calendar.SECOND);  
 
        System.out.println(year + "年" + (month + 1) + "月" + date + "日" + "\t"  
             + hour_of_day + "时" + minuth + "分" + second + "秒");  
  }  
}  
